home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 428_02 / libsrc / xprintf.c < prev   
Encoding:
C/C++ Source or Header  |  1994-03-13  |  474 b   |  27 lines

  1. /*
  2. ** xprintf.c
  3. **
  4. ** Pictor, Version 1.51, Copyright (c) 1992-94 SoftCircuits
  5. ** Redistributed by permission.
  6. */
  7.  
  8. #include <stdio.h>
  9. #include <stdarg.h>
  10. #include "pictor.h"
  11.  
  12. /*
  13. ** Formatting for print routines.
  14. */
  15. void xprintf(void (*function)(),char *arg_list,...)
  16. {
  17.     static char buffer[133];
  18.     va_list arg_ptr;
  19.     char *format;
  20.  
  21.     va_start(arg_ptr,arg_list);
  22.     format = arg_list;
  23.     vsprintf(buffer,format,arg_ptr);
  24.     function(buffer);
  25.  
  26. } /* xprintf */
  27.